Method and device for controlling a camera capable of pan and tilt control

ABSTRACT

The present invention relates generally a method and device for controlling a camera capable of pan and tilt control, and more specifically a method and device for controlling adjustments of the field of view of such camera.

FIELD OF INVENTION

The present invention relates generally a method and device forcontrolling a camera capable of pan and tilt control, and morespecifically a method and device for controlling adjustments of thefield of view of such camera.

BACKGROUND

For many video camera applications, e.g. monitoring applications, it isadvantageous to use a camera which can pan, tilt (and optionally zoomand/or rotate) to cover a large area. Such camera is known under thename PT (pan-tilt) camera, PTZ (pan-tilt-zoom) camera etc. The PTfunctionality may also be provided by the camera being mounted on a socalled PT head, which is a motorized mounting base which can pan andtilt a camera mounted thereon. During e.g. a pan/tilt motion of thecamera, the bit rate of a video stream captured by the camera can reachhigh levels. This is due to the fact that the adjustment within thevideo stream, i.e. between two consecutive image frames within the videostream, makes P-block encoding difficult to achieve. Consequently, mostor all pixel blocks within an image frame are encoded using costlyI-blocks during such adjustment, leading to an increased bit rate.

Within video processing there is a continuing effort put into reducingthe bit rate while maintaining a perceived quality of the video stream.A solution to the above problem is to adapt a motion vector search rangeof the encoder encoding the video stream according to the speed of thepan/tilt adjustment. Since searching for matching blocks of pixelsbetween two images usually requires a large amount of arithmeticcomputation and an increase motion vector search range lead to that morecomparisons is made, a problem with this solution is that thecomputational complexity of the encoding process will increase, thusrequiring more processor power and/or increase processing time forcompleting the encoding process.

There is thus a need for improvements within this context.

SUMMARY

In view of the above, an objective of the invention is to solve or atleast reduce one or several of the drawbacks discussed above. Generally,the above objective is achieved by the attached independent patentclaims.

According to a first aspect, the present invention is realized by amethod for controlling a camera capable of pan and tilt, PT, control,the camera being connected to an encoder arranged to encode a videostream captured by the camera, the encoder having a motion vector searchrange, the method comprising the steps of:

retrieving a first field of view, FOV, setting of a current image framein the video stream,

receiving a user input pertaining to a desired adjustment of the FOVfrom the first FOV setting to a second FOV setting in a subsequent imageframe in the video stream,

defining a period of time between the current image frame and thesubsequent image frame using a frame per second, FPS, setting of thecamera, and calculating a speed and a direction of the desiredadjustment of the FOV using the period of time,

determining a first threshold speed by translating the motion vectorsearch range of the encoder to a maximum adjustment of the FOV of thecamera during the period of time and calculating a speed of the maximumadjustment of the FOV,

determining a second threshold speed by multiplying the first thresholdspeed with a value higher than 1, and

comparing the speed of the desired adjustment of the FOV with the firstthreshold speed and the second threshold speed.

If the speed of the desired adjustment of the FOV is higher than thesecond threshold speed or lower than the first threshold speed, the FOVof the camera is adjusted from the first FOV setting to the second FOVsetting during the period of time. In other words, the FOV of the camerais adjusted according to the user input.

However, if the speed of the desired adjustment of the FOV is betweenthe first threshold speed and second threshold speed, the FOV of thecamera is adjusted, during the period of time, based on the direction ofthe desired adjustment of the FOV and the first threshold speed.

This means that in case the user wants to adjust the FOV of the camerawith a magnitude such that the encoder still will be able to findmatching blocks between two consecutive images in the video stream usingthe motion vector search range of the encoder, the adjustment of the FOV(via a pan/tilt movement of the camera) is carried out as requested bythe user. For example, if the motion vector search range of the encoderis 15 pixels, and the user wants to adjust the FOV with a magnitudecorresponding to less or equal to 15 pixels difference between twoconsecutive images in the video stream, the adjustment is carried out asdesired by the user and most blocks of pixels within the video streamwill be encoded using P-blocks.

Also, if the user wants to adjust the FOV of the camera with a magnitudewhich to corresponds to more than a threshold times the motion vectorsearch range, e.g. a 50 pixels difference between two consecutive imagesin the video stream in the case of a 15 pixels motion vector searchrange, the adjustment is carried out as desired by the user and mostblocks of pixels within the video stream will be encoded using I-blocks.

However, if the user want to adjust the FOV of the camera with amagnitude that corresponds to a more than the motion vector search rangeof pixels difference between two consecutive image frames, but stillbelow the second threshold difference, the speed of the adjustment ofthe FOV is decreased compared to what was desired from the user, suchthat most blocks of pixels within the video stream will be encoded usingP-blocks.

One advantage of the present embodiment is that for a certain range ofadjustments of the FOV, the speed of the adjustment will be capped tomeet the motion vector search range of the encoder. Consequently, theencoder will be able to encode most of the blocks of pixels usingP-blocks, and the user may not notice the deviation of the speed of theadjustment of the FOV of the camera compared to the desired speed. Forexample, the user input may pertain to an adjustment of the FOV with 96degrees in a horizontal direction over the next 24 image frames. Thismeans that for each frame, the FOV need to be adjusted with 4 degrees.When determining the speed of the maximum adjustment of the FOV (basedon the motion vector search range of the encoder), this is in thisexample calculated to correspond to an adjustment of 3 degrees per imageframe. The adjustment of the FOV may thus be changed such that the 80degrees adjustment of the FOV is performed during the next 32 framesinstead, which will lead to a lower bit rate since the encoder canencode most of the image frames using P-blocks, and the user may notperceive the eight extra frames that the adjustment took as disturbing.

By the term “motion vector search range” should, in the context ofpresent specification, be understood the image search range for motioncompensation in the encoder. In video compression, a motion vector isthe key element in the motion estimation process. It is used torepresent a block of pixels in an image frame based on the position ofthis block of pixels (or a similar block of pixels) in another imageframe (reference image), e.g. the immediately preceding image frame inthe video stream. As described above, the motion vector search rangedetermines the size of the area in the reference image in which thesearch for a similar block of pixels is conducted.

By the term “FOV setting” should, in the context of presentspecification, be understood the extent of the scene around the camerathat is captured by an image sensor of the camera and transmitted to theencoder at any given moment. The field of view can also be called angleof view (AOV). It is important to distinguish the term FOV from theextent of the scene around the camera that the image sensor of thecamera is capturing. Normally, the image data captured by the imagesensor is equal to the FOV, but in some cases, so called digital FOV canbe employed. This means that from the data captured by the image sensor,only a subpart is transmitted to the encoder and subsequently formingthe encoded video stream. In this specification, the term FOV of thecamera should be understood to encompass both the above describedimplementations of FOV. Throughout this specification, including in theclaims, “FOV” and “FOV settings” are used synonymously to denote theextent of the scene around the camera that is captured by an imagesensor of the camera and transmitted to the encoder at any given moment.

When determining the first threshold speed, the motion vector searchrange of the encoder, e.g. 15 pixels, is translated to instead describean adjustment of the FOV. In other words, it is calculated what themaximum adjustment of the FOV is that still would allow the encoder tofind matching blocks of pixels between two image frames in the areadefined by the motion vector search range. Of course, this is atheoretical calculation which is based on the assumption that contentsof the scene captured by the camera have not moved between the twoimages. Based on this theoretical calculation, a speed of the maximumadjustment of the FOV can be calculated and used as the first thresholdspeed. The translation from a number of pixels (motion vector searchrange) to an adjustment of the FOV involves the image resolution of theimage frames captured by the camera as well as the angular extent (insome cases, the angle of view of the lens of the camera) of a givenscene that is captured by the camera and encoded by the encoder.

According to some embodiments, the camera is further capable of zoom, Z,control.

According to some embodiments, the camera is further capable ofrotation, R, control.

According to some embodiments, the encoder is arranged to encode thevideo stream with a FPS setting different than the FPS setting of thecamera. In this case, a ratio between the FPS setting of the encoder andthe FPS setting of the camera is advantageously calculated andconsidered when determining the first threshold speed. For example, ifthe encoder encodes only one image frame per second while the cameracaptures 20 image frames per second, the maximum adjustment of the FOVfrom one image frame to the next for the camera may only correspond to1/20 of the motion vector search range as described above.Alternatively, the maximum adjustment of the FOV from image frame n toimage frame n+20 may only correspond to the motion vector search rangeas described above.

According to some embodiments, the second threshold speed is determinedby multiplying the first threshold speed with 2. This may be consideredas a good balance between the users' perceived deviation between thedesired speed and the actual speed of the adjustment of the FOV and thedecrease of bit rate of the encoded video stream outputted from theencoder.

In a second aspect, the present invention provides a computer programproduct comprising a computer-readable storage medium with instructionsadapted to carry out the method of the first aspect when executed by adevice having processing capability.

In a third aspect, the present invention provides a controlling deviceadapted for controlling a camera capable of pan and tilt, PT, control,the camera being connected to an encoder arranged to encode a videostream captured by the camera, the encoder having a motion vector searchrange, the controlling device comprising a processor arranged for:

retrieving, from the camera, a first field of view, FOV, setting of acurrent image frame in the video stream,

receiving a user input pertaining to a desired adjustment of the FOVfrom the first FOV setting to a second FOV setting in a subsequent imageframe in the video stream, defining a period of time between the currentimage frame and the subsequent image frame using a frame per second,FPS, setting of the camera, and calculating a speed and a direction ofthe desired adjustment of the FOV using the period of time,

determining a first threshold speed by translating the motion vectorsearch range of the encoder to a maximum adjustment of the FOV of thecamera during the period of time and calculating a speed of the maximumadjustment of the FOV,

determining a second threshold speed by multiplying the first thresholdspeed with a value higher than 1,

comparing the speed of the desired adjustment of the FOV with the firstthreshold speed and the second threshold speed,

upon determining that the speed of the desired adjustment of the FOV ishigher than the second threshold speed or lower than the first thresholdspeed, adjusting the FOV of the camera from the first FOV setting to thesecond FOV setting during the period of time,

upon determining that the speed of the desired adjustment of the FOV isbetween the first threshold speed and second threshold speed, adjustingthe FOV of the camera during the period of time based on the directionof the desired adjustment of the FOV and the first threshold speed.

In a fourth aspect, the present invention provides a camera capable ofpan and tilt, PT, control, the camera being connected to an encoderarranged to encode a video stream captured by the camera, the cameracomprising a controlling device according to the third aspect.

According to some embodiments, the camera is connected to a joystick forproviding the user input pertaining to the desired adjustment of theFOV.

The second, third and fourth aspect may generally have the same featuresand advantages as the first aspect.

BRIEF DESCRIPTION OF THE DRAWINGS

The above, as well as additional objects, features and advantages of thepresent invention, will be better understood through the followingillustrative and non-limiting detailed description of embodiments of thepresent invention, with reference to the appended drawings, where thesame reference numerals will be used for similar elements, wherein:

FIG. 1 schematically shows the basis of motion-compensated predictionencoding and the purpose of a motion vector search range of an encoder,

FIG. 2 shows a transfer function between a speed of a desired adjustmentof a FOV of a camera and the actual speed of the adjustment of the FOVof the camera,

FIGS. 3-6 each shows by way of example how an adjustment of a FOV can betranslated into a speed and a direction of the adjustment,

FIG. 7 shows a method for controlling a camera capable of PT controlaccording to embodiments of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 shows a camera 102 that is capturing a video stream 104 whichcomprises a plurality of image frames 106, 108. When encoding such videostream, motion-compensated prediction encoding may advantageously beused as an encoding method. When the camera moves in 3D space, or whenthe content within the scene captured by the camera moves, this resultsin a displacement in the image plane of the content in the image frames.This is exemplified in FIG. 1 where the object in a first image frame106 of the video stream has moved in a second image 108 of the videostream. Motion-compensated prediction encoding typically tries torepresent a block of pixels, such as the block 110 in the second imageframe 108, with a motion vector describing the movement for that blockof pixels between the second image frame and a previous image frame 106.Optionally residual data corresponding to a difference of contentbetween the encoded block of pixels 110 and the best matching block ofpixels 114 in the previous image frame is also encoded.

The motion-compensated prediction encoding employs a motion vectorsearch range 116 when searching for matching blocks of pixels in e.g.the previous image frame to the one being encoded. The encodingtypically starts searching for a similar block of pixels at the sameposition 112 in the previous image 106 as the block 110 currently beingencoded. Any suitable block matching algorithm may be used in thesearch. Originating from the start position 112, the encoder will searchwithin the motion vector search range 116, for a matching block ofpixels. In case no suitable matching block is found in the motion vectorsearch area 118, the encoder will typically encode the block of pixelsusing I-block encoding, which requires more bits compared to if e.g.p-block encoding (motion-compensated prediction encoding) can be used.Needless to say, if the camera has moved such that corresponding blocksbetween two image frames are outside the motion vector search area 118,no matching blocks will be found and the entire image frame may need tobe encoded using I-frame encoding, which result in an increased bit ratefor transmitting the encoded image frame compared to if p-block encodingcan be used for most or all blocks of pixels in the image frame. Such ascenario may be during a pan-tilt (PT) motion of the camera, where thebit rate can reach high levels. In a best case scenario, the PT-motion(adjustment of the FOV) will be small enough for the encoder to be ableto find a good motion vector match and encode each macroblock as aP-block. However in many cases (especially if the encoder has a limitedmotion vector search range 116) the motion is too large and most blocksare instead encoded as I-blocks. As described above, I-blocks aregenerally much costlier to encode than P-blocks, which will result inthat the bit rate spikes.

The present invention is based on the idea to limit the allowed speed ofan adjustment of the FOV (by a PT(Z) movement of the camera) based onthe motion vector search range of the encoder, such that predictionencoding can be used in some cases where I-block encoding wouldotherwise be needed. A typical implementation may be to clamp the speedof the adjustment of the FOV as shown in FIG. 2, such that if the speedof the desired adjustment of the FOV is higher than what the encoder maybe able to encode using P-blocks, but lower than a certain thresholdspeed, the speed of the adjustment can be restricted to meet the encoderrequirements for p-block encoding. In FIG. 2, the speed 202 of a desiredadjustment of the FOV and the speed of the actual speed 204 of theadjustment is the same except for a certain range of speed (between afirst threshold speed 206 and a second threshold speed 208), where theactual speed 204 is clamped.

In other words, in case the speed of the desired adjustment of the FOVis between the first threshold speed 206 and second threshold speed 208,the FOV will be adjusted based on the direction of the desiredadjustment of the FOV and the first threshold speed. By doing this, thespeed of the adjustment of the FOV will be restricted to the encoderlimit for a certain range of speeds while for speeds above thethreshold, the actual speed will correspond to the desired speed. Thisis advantageous since for a user that wants to quickly adjust the FOV,the desired adjustment of the FOV will also be the resulting actualadjustment of the FOV.

In order to calculate a speed and a direction of the desired adjustmentof the FOV, different algorithms and scales may be used. For example,the speed of the desired adjustment may be expressed by a length of avector in 3D space, e.g. from a center of the first FOV to a center of asecond FOV. This embodiment is schematically shown in FIG. 3. Tosimplify the illustration, FIG. 3 (and also FIGS. 4-6) shows adjustmentsof the FOV in 2D space, i.e. 2D projection of the FOV in 3D space.

Alternatively, polar coordinates may be used to calculate a length anddirection of the vector around an imaginary sphere with a center in anorigin of the movement for the camera, i.e. a suspension point for thecamera around which the camera can move.

The FOV may be represented by an angular extent of a given scene that iscaptured by the camera (described further below) and a point in 3D spacerepresenting the pointing direction of the camera. The center point ofthe FOV may thus be represented by the pointing direction (an X, Y, andZ value or similar) and the corners of the FOV may be calculated usingthe center point and the angular extent of a given scene that iscaptured by the camera.

By calculating a vector 306 between a first FOV 302 and a second,desired, FOV 304, the length of the vector 306 may be used as a valueindicating the speed of the adjustment, while the direction of thevector may be used to indicate the direction of the adjustment of theFOV. The length may e.g. be calculated as a difference in X, Y and Zbetween the pointing direction of the camera having the first FOV 302and the pointing direction of the camera having the second, desired, FOV304.

Instead of just using a center point of the first and second FOV forcalculating the speed and direction, the corners of the FOV may be used.This is shown in FIG. 4 where 4 vectors 306 a-d are calculated, one pereach corner of the FOV. For calculating the speed and direction, anaverage value of the four vectors 306 a-d may be used. Alternatively,the longest or the shortest vector may be used.

In case a zoom is involved, or if rotation of the FOV is involved in theadjustment, using the corners of the FOV for calculating the speed anddirection of the adjustment of the FOV may be advantageous. In the caseof rotation, as shown in FIG. 5, this may result in different length anddirection of the four vectors 306 a-d. The resulting speed and directionof the desired adjustment of the FOV may be calculated as describedabove. In case of zooming (as shown in FIG. 6), using the center of thefirst FOV 302 and the second FOV 304 would result in a zero vector, i.e.a vector of length 0, which thus has all components equal to zero.However, this is not correct since the content of the scene captured bythe camera will have moved between the image frame captured by thecamera with the first FOV 302 and the image frame captured by the camerawith the second FOV 304.

It should be noted that the desired adjustment of the FOV is notinstantaneous, but will instead take place during a period of time. Forexample, the first FOV 302 may be the FOV for a first image frame, whilethe second FOV may be the FOV for a n:th image frame. By using theframes per second (FPS) of the camera, the period of time for theadjustment can be calculated. For example, if the FPS is x frames persecond; the period of time in this case will be n/x seconds. Bycalculating the speed based on the period of time, the case where theFPS of the camera differs from the encoding FPS of the encoder may beadvantageously handled as described above.

When determining the first threshold speed (206 in FIG. 2), the motionvector search range of the encoder needs to be translated to a maximumadjustment of the FOV of the camera during the period of time. By takinginto consideration the resolution of the images captured by the camera,and the angular extent of a given scene that is captured by the camera,the motion vector search range of the encoder can be translated into amaximum adjustment of the FOV of the camera. The lens or lenses of thecamera is adapted to capture a cone of light. The image circle is thecross section of the cone of light. To avoid vignetting (saturation atthe periphery of an image), the camera must have an image circle largerthan the size of the image format of the captured image. The angularextent of a given scene that is captured by the camera corresponds tothe captured image, not to the angle range that a lens can image.

For example, if the angular extent of the scene captured by the cameramay be 40 degrees in a horizontal direction and 30 degrees in a verticaldirection. The resolution of a captured image may be 1200*900 pixels.This means that every pixel corresponds to a 1/30 degree. In case themotion vector search range is 30 pixels, this corresponds to anadjustment of the FOV between two encoded images in the encoder of 1degree. In case the FPS of the encoder is the same as the FPS of thecamera, the maximum adjustment of the FOV between two captured images is1 degree. For this example, the first threshold would thus correspond toa one degree adjustment of the FOV of the camera (in 3D space).

The second threshold speed (208 in FIG. 2) is determined by multiplyingthe first threshold speed with a value higher than 1. The value may be1.2, 1.5, 2, 4 etc. According to some embodiments, the value is 2. Sousing the above example, the second threshold may correspond to 2degrees adjustment of the FOV of the camera between two captured images.

So if the user desires to adjust the FOV with 38 degrees in a horizontaldirection over the next 20 frames, the capping of the speed of theadjustment may be employed such that it will take 38 frames to adjustthe FOV, resulting in a lower bit rate of the encoded video stream. Ifthe user instead desires to adjust the FOV with 45 degrees, the cappingwill not be employed and the adjustment will take the desired 20 frames,which may result in a peak in the bit rate during the adjustment of theFOV since I-encoding may be needed. Using a second threshold asdescribed above, users intending to quickly adjust the FOV of the cameramay still be able to do this during the desired period of time foradjustments with a speed exceeding the second threshold.

FIG. 7 shows a method for controlling a camera capable of PT controlaccording to embodiments of the invention. As described above, also acamera capable of PTZ, PTR or PTZR control can be controlled using thismethod. The movements of the camera may be arranged to be remotelycontrolled.

The camera is connected to an encoder arranged to encode a video streamcaptured by the camera. The encoder may be external or internal to thecamera. The encoder has a defined motion vector search range, which mayor may not be adjustable.

The method comprises the step of retrieving S702 a first FOV setting ofa current image frame in the video stream. This means that the currentFOV of the camera is retrieved.

The method further comprises the step of receiving S704 a user inputpertaining to a desired adjustment of the FOV from the first FOV settingto a second FOV setting in a subsequent image frame in the video stream.The user may for example input a command to the camera requesting thecamera to turn 90 degrees in a horizontal direction, or change the zoomvalue from 1× to 2.5×. The desired adjustment may pertain to anyadjustment of the FOV.

The user input may be provided to the camera by a joystick or othersuitable controlling means for controlling the FOV of the camera such asa computer mouse. The joystick (mouse etc.) may comprise e.g. a buttonor similar which can be pushed (activated etc.) for overriding thecapping of speed of the adjustment between the first and secondthreshold. The override functionality may also be provided in a computerinterface available to the user. The controlling means can be used fordirectly adjusting the FOV by movement of the controlling means (e.g.the stick of the joystick), or the controlling means may be used inconjunction with a computer interface to point and click in an image foradjusting the FOV of the camera. In the latter case, such adjustment maybe predefined to take place during a specific period of time, whichperiod of time then can change based on the first and second thresholdas described above and further below. Another typical situation is whenthe camera is set up to perform a guard tour, moving between a pluralityof predefined positions, at a predefined speed.

The desired adjustment may thus involve a time period during which theadjustment takes place, or a number of image frames in the video streamthat may be captured during the adjustment. In other words, the userinput pertains to a desired adjustment of the FOV from the first FOVsetting to a second FOV setting in a subsequent image frame in the videostream. From this, a period of time between the current image frame andthe subsequent image frame may be defined, using a FPS setting of thecamera.

From the desired adjustment of the FOV, a speed and a direction of thedesired adjustment of the FOV may be calculated S706. The calculation ofthe speed involves the period of time during which the adjustment takesplace.

The method further comprises the step of determining S708 a firstthreshold speed by translating the motion vector search range of theencoder to a maximum adjustment of the FOV of the camera during theperiod of time. From this, a speed of the maximum adjustment of the FOVcan be calculated. It should be noted that in case the motion vectorsearch range of the encoder is a fixed number (e.g. 15, 30 40, 50 etc.)number of pixels, the step of determining S708 a first threshold speedmay be needed to be performed only once for each camera, or only onstartup of the camera.

The method further comprises the step of determining S710 a secondthreshold speed by multiplying the first threshold speed with a valuehigher than 1. As understood from the above, according to someembodiments, this step is only performed when the first threshold speedis determined S708. The value can be any suitable value higher than 1,e.g. 1.2, 1.5, 2, 2.5, 4 etc.

The method further comprises the step of comparing S712 the speed of thedesired adjustment of the FOV with the first threshold speed and thesecond threshold speed, and based on this comparison the FOV may beadjusted in two different ways.

If it is determined that the speed of the desired adjustment of the FOVis higher than the second threshold speed or lower than the firstthreshold speed, the FOV of the camera is adjusted S714 from the firstFOV setting to the second FOV setting during the period of time. Thismeans that the desired adjustment of the FOV from the user is performed.

However, if it is determined that the speed of the desired adjustment ofthe FOV is between the first threshold speed and second threshold speed,the FOV of the camera is adjusted S716, during the period of time, basedon the direction of the desired adjustment of the FOV and the firstthreshold speed. This means that the FOV is adjusted with the maximumspeed such that the encoder still may find corresponding blocks ofpixels between two image frames in the video stream, and the bit ratemay thus be kept at a lower level compared to if the FOV was allowed tobe adjusted according to the desire of the user.

What is claimed is:
 1. A method for controlling a camera capable of panand tilt (PT) control, the camera being connected to an encoder arrangedto encode a video stream captured by the camera, the encoder having amotion vector search range, the method comprising the steps of:retrieving a first field of view (FOV) setting of a current image framein the video stream, receiving an input pertaining to a desiredadjustment of the FOV from the first FOV setting to a second FOV settingin a subsequent image frame in the video stream, defining a period oftime between the current image frame and the subsequent image frameusing a frame per second (FPS) setting of the camera, and calculating aspeed and a direction of the desired adjustment of the FOV using theperiod of time, determining a first threshold speed by translating themotion vector search range of the encoder to a maximum adjustment of theFOV of the camera during the period of time and calculating a speed ofthe maximum adjustment of the FOV, determining a second threshold speedby multiplying the first threshold speed with a value higher than 1,comparing the speed of the desired adjustment of the FOV with the firstthreshold speed and the second threshold speed, upon determining thatthe speed of the desired adjustment of the FOV is higher than the secondthreshold speed or lower than the first threshold speed, adjusting theFOV of the camera from the first FOV setting to the second FOV settingduring the period of time, upon determining that the speed of thedesired adjustment of the FOV is between the first threshold speed andsecond threshold speed, adjusting the FOV of the camera during theperiod of time based on the direction of the desired adjustment of theFOV and the first threshold speed.
 2. The method according to claim 1,wherein the camera is further capable of zoom (Z) control.
 3. The methodaccording to claim 1, wherein the camera is further capable of rotation(R) control.
 4. The method according to claim 1, wherein the encoder isarranged to encode the video stream with a FPS setting different thanthe FPS setting of the camera, wherein the step of determining a firstthreshold speed comprises: calculating a ratio between the FPS settingof the encoder and the FPS setting of the camera.
 5. A method accordingto claim 1, wherein the second threshold speed is determined bymultiplying the first threshold speed with
 2. 6. A non-transitorycomputer-readable storage medium with computer code instructions adaptedto carry out the method of claim 1 when executed by a device havingprocessing capability.
 7. A controlling device adapted for controlling acamera capable of pan and tilt (PT) control, the camera being connectedto an encoder arranged to encode a video stream captured by the camera,the encoder having a motion vector search range, the controlling devicecomprising a processor arranged for: retrieving, from the camera, afirst field of view (FOV) setting of a current image frame in the videostream, receiving a user input pertaining to a desired adjustment of theFOV from the first FOV setting to a second FOV setting in a subsequentimage frame in the video stream, defining a period of time between thecurrent image frame and the subsequent image frame using a frame persecond (FPS) setting of the camera, and calculating a speed and adirection of the desired adjustment of the FOV using the period of time,determining a first threshold speed by translating the motion vectorsearch range of the encoder to a maximum adjustment of the FOV of thecamera during the period of time and calculating a speed of the maximumadjustment of the FOV, determining a second threshold speed bymultiplying the first threshold speed with a value higher than 1,comparing the speed of the desired adjustment of the FOV with the firstthreshold speed and the second threshold speed, upon determining thatthe speed of the desired adjustment of the FOV is higher than the secondthreshold speed or lower than the first threshold speed, adjusting theFOV of the camera from the first FOV setting to the second FOV settingduring the period of time, upon determining that the speed of thedesired adjustment of the FOV is between the first threshold speed andsecond threshold speed, adjusting the FOV of the camera during theperiod of time based on the direction of the desired adjustment of theFOV and the first threshold speed.
 8. A camera capable of pan and tilt,PT, control, the camera being connected to an encoder arranged to encodea video stream captured by the camera, the camera comprising acontrolling device according to claim
 7. 9. A camera according to claim8 being connected to a joystick for providing the input pertaining tothe desired adjustment of the FOV.